/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * EditarFuncionario.java
 *
 * Created on 05/04/2011, 00:32:44
 */
package editar;

import Classe.BD;
import Classe.Bairro;
import Classe.Cidade;
import Classe.Endereco;
import Classe.Estado;
import Classe.Funcionario;
import Classe.Validacao;
import java.awt.Component;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;
import java.text.SimpleDateFormat;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;
import javax.swing.JOptionPane;

/**
 *
 * @author gladson
 */
public class EditarFuncionario extends Validacao {

    Funcionario fun;
    private Component frameI;

    /** Creates new form EditarFuncionario */
    public EditarFuncionario() {

        initComponents();
        this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);

    }
    int idFun;
    String estad;
    String cid;
    String bai;
    String end;

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel2 = new javax.swing.JPanel();
        jpnCadastroFuncionario = new javax.swing.JPanel();
        lblPessoaFuncionario = new javax.swing.JPanel();
        lblDataNascimentoFuncionario = new javax.swing.JLabel();
        lblCpfFuncionario = new javax.swing.JLabel();
        sTxtRgFuncionario = new javax.swing.JTextField();
        lblNomeFuncionario = new javax.swing.JLabel();
        sTxtNomeFuncionario = new javax.swing.JTextField();
        lblRgFuncionario = new javax.swing.JLabel();
        lblTelefoneFuncionario = new javax.swing.JLabel();
        lblCelularFuncionario = new javax.swing.JLabel();
        lblEmailFuncionario = new javax.swing.JLabel();
        sTxtEmailFuncionario = new javax.swing.JTextField();
        sTxtCpfFuncionario = new javax.swing.JFormattedTextField();
        sTxtDataNascimentoFuncionario = new javax.swing.JFormattedTextField();
        txtTelefoneFuncionario = new javax.swing.JFormattedTextField();
        sTxtCelularFuncionario = new javax.swing.JFormattedTextField();
        stxtDataFuncionario = new javax.swing.JTextField();
        lblDataFuncionario = new javax.swing.JLabel();
        jpnEnderecoFuncionario = new javax.swing.JPanel();
        lblCefFuncionario = new javax.swing.JLabel();
        lblEstadoFuncionario = new javax.swing.JLabel();
        cbEstadoFuncionario = new javax.swing.JComboBox();
        lblCidadeFuncionario = new javax.swing.JLabel();
        cbCidadeFuncionario = new javax.swing.JComboBox();
        lblBairroFuncionario = new javax.swing.JLabel();
        cbBairroFuncionario = new javax.swing.JComboBox();
        lblRuaAvenidaFuncionario = new javax.swing.JLabel();
        cbEnderecoFuncionario = new javax.swing.JComboBox();
        lblNumeroFuncionario = new javax.swing.JLabel();
        iTxtNumeroFuncionario = new javax.swing.JTextField();
        lblComplementoFuncionario = new javax.swing.JLabel();
        sTxtCepFuncionario = new javax.swing.JFormattedTextField();
        stxtCompFuncionario = new javax.swing.JComboBox();
        stxtApFuncionario = new javax.swing.JTextField();
        lblApartamentoCliente = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        pnlProfissionalFuncionario = new javax.swing.JPanel();
        slblDataAdmissaoFuncionario = new javax.swing.JLabel();
        slblDataDemissaoFuncionario = new javax.swing.JLabel();
        dTxtSalarioFuncionario = new javax.swing.JTextField();
        lblSalarioFuncionario = new javax.swing.JLabel();
        sTxtCargoFuncionario = new javax.swing.JTextField();
        lblCargoFuncionario = new javax.swing.JLabel();
        sTxtDataAdmissao = new javax.swing.JFormattedTextField();
        sTxtDataDemissao = new javax.swing.JFormattedTextField();
        pnlCadastroFuncionario = new javax.swing.JPanel();
        btCadastroLoginFuncionario = new javax.swing.JButton();
        btSalvarFuncionario = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        stxtObsFuncionario = new javax.swing.JTextArea();
        jButton2 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setResizable(false);

        jPanel2.setBackground(new java.awt.Color(255, 255, 255));

        jpnCadastroFuncionario.setBackground(new java.awt.Color(255, 255, 255));
        jpnCadastroFuncionario.setBorder(javax.swing.BorderFactory.createTitledBorder(null, " Editar Cadastro Funcionário ", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("PMingLiU", 0, 36))); // NOI18N
        jpnCadastroFuncionario.setPreferredSize(new java.awt.Dimension(800, 600));

        lblPessoaFuncionario.setBackground(new java.awt.Color(255, 255, 255));
        lblPessoaFuncionario.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Pessoal", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 1, 12))); // NOI18N

        lblDataNascimentoFuncionario.setFont(new java.awt.Font("Arial", 1, 11));
        lblDataNascimentoFuncionario.setText("Data Nasc.");

        lblCpfFuncionario.setFont(new java.awt.Font("Arial", 1, 11));
        lblCpfFuncionario.setText("CPF");

        sTxtRgFuncionario.setFont(new java.awt.Font("Arial", 0, 12));
        sTxtRgFuncionario.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

        lblNomeFuncionario.setBackground(new java.awt.Color(204, 204, 204));
        lblNomeFuncionario.setFont(new java.awt.Font("Arial", 1, 11));
        lblNomeFuncionario.setText("Nome");

        sTxtNomeFuncionario.setFont(new java.awt.Font("Arial", 0, 12));
        sTxtNomeFuncionario.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        sTxtNomeFuncionario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                sTxtNomeFuncionarioActionPerformed(evt);
            }
        });

        lblRgFuncionario.setFont(new java.awt.Font("Arial", 1, 11));
        lblRgFuncionario.setText("RG");

        lblTelefoneFuncionario.setFont(new java.awt.Font("Arial", 1, 11));
        lblTelefoneFuncionario.setText("Telefone");

        lblCelularFuncionario.setFont(new java.awt.Font("Arial", 1, 11));
        lblCelularFuncionario.setText("Celular");

        lblEmailFuncionario.setFont(new java.awt.Font("Arial", 1, 11));
        lblEmailFuncionario.setText("E-mail");

        sTxtEmailFuncionario.setFont(new java.awt.Font("Arial", 0, 12));
        sTxtEmailFuncionario.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

        sTxtCpfFuncionario.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        try {
            sTxtCpfFuncionario.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###.###.###-##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        sTxtDataNascimentoFuncionario.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        try {
            sTxtDataNascimentoFuncionario.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        txtTelefoneFuncionario.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        try {
            txtTelefoneFuncionario.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##)####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        sTxtCelularFuncionario.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        try {
            sTxtCelularFuncionario.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##)####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        javax.swing.GroupLayout lblPessoaFuncionarioLayout = new javax.swing.GroupLayout(lblPessoaFuncionario);
        lblPessoaFuncionario.setLayout(lblPessoaFuncionarioLayout);
        lblPessoaFuncionarioLayout.setHorizontalGroup(
            lblPessoaFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(lblPessoaFuncionarioLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(lblPessoaFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(lblPessoaFuncionarioLayout.createSequentialGroup()
                        .addGroup(lblPessoaFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblNomeFuncionario)
                            .addComponent(sTxtNomeFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 365, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(lblPessoaFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblCpfFuncionario, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(sTxtCpfFuncionario, javax.swing.GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE))
                        .addGap(18, 18, 18)
                        .addGroup(lblPessoaFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(sTxtRgFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblRgFuncionario))
                        .addGap(18, 18, 18)
                        .addGroup(lblPessoaFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblDataNascimentoFuncionario)
                            .addComponent(sTxtDataNascimentoFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(lblPessoaFuncionarioLayout.createSequentialGroup()
                        .addGroup(lblPessoaFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblTelefoneFuncionario)
                            .addComponent(txtTelefoneFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(lblPessoaFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblCelularFuncionario)
                            .addComponent(sTxtCelularFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(lblPessoaFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(lblPessoaFuncionarioLayout.createSequentialGroup()
                                .addComponent(lblEmailFuncionario)
                                .addGap(249, 249, 249))
                            .addComponent(sTxtEmailFuncionario, javax.swing.GroupLayout.DEFAULT_SIZE, 463, Short.MAX_VALUE))))
                .addContainerGap())
        );

        lblPessoaFuncionarioLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {sTxtCelularFuncionario, txtTelefoneFuncionario});

        lblPessoaFuncionarioLayout.setVerticalGroup(
            lblPessoaFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(lblPessoaFuncionarioLayout.createSequentialGroup()
                .addGroup(lblPessoaFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(lblPessoaFuncionarioLayout.createSequentialGroup()
                        .addComponent(lblNomeFuncionario)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(sTxtNomeFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(lblPessoaFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(sTxtDataNascimentoFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(lblPessoaFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblDataNascimentoFuncionario)
                            .addGroup(lblPessoaFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addGroup(lblPessoaFuncionarioLayout.createSequentialGroup()
                                    .addComponent(lblCpfFuncionario)
                                    .addGap(7, 7, 7)
                                    .addComponent(sTxtCpfFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(lblPessoaFuncionarioLayout.createSequentialGroup()
                                    .addComponent(lblRgFuncionario)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(sTxtRgFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(lblPessoaFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblTelefoneFuncionario)
                    .addGroup(lblPessoaFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(lblPessoaFuncionarioLayout.createSequentialGroup()
                            .addComponent(lblCelularFuncionario)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(sTxtCelularFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(txtTelefoneFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(lblPessoaFuncionarioLayout.createSequentialGroup()
                            .addComponent(lblEmailFuncionario)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(sTxtEmailFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        stxtDataFuncionario.setFont(new java.awt.Font("Arial", 0, 12));
        stxtDataFuncionario.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        Date data = new Date(System.currentTimeMillis());
        SimpleDateFormat formatarDate = new SimpleDateFormat("dd/MM/yyyy");/*
        */
        stxtDataFuncionario.setText(formatarDate.format(data));
        stxtDataFuncionario.setEnabled(false);
        stxtDataFuncionario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                stxtDataFuncionarioActionPerformed(evt);
            }
        });

        lblDataFuncionario.setBackground(new java.awt.Color(0, 204, 204));
        lblDataFuncionario.setFont(new java.awt.Font("Arial", 1, 12));
        lblDataFuncionario.setText("Data");

        jpnEnderecoFuncionario.setBackground(new java.awt.Color(255, 255, 255));
        jpnEnderecoFuncionario.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Endereço", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 1, 12))); // NOI18N

        lblCefFuncionario.setFont(new java.awt.Font("Arial", 1, 11));
        lblCefFuncionario.setText("CEP");

        lblEstadoFuncionario.setFont(new java.awt.Font("Arial", 1, 11));
        lblEstadoFuncionario.setText("Estado");

        cbEstadoFuncionario.setFont(new java.awt.Font("Arial", 0, 12));
        cbEstadoFuncionario.setModel(new javax.swing.DefaultComboBoxModel(new String[] {}));
        cbEstadoFuncionario.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        cbEstadoFuncionario.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbEstadoFuncionarioItemStateChanged(evt);
            }
        });

        lblCidadeFuncionario.setFont(new java.awt.Font("Arial", 1, 11));
        lblCidadeFuncionario.setText("Cidade");

        cbCidadeFuncionario.setModel(new javax.swing.DefaultComboBoxModel(new String[] {}));
        cbCidadeFuncionario.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        cbCidadeFuncionario.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbCidadeFuncionarioItemStateChanged(evt);
            }
        });

        lblBairroFuncionario.setFont(new java.awt.Font("Arial", 1, 11));
        lblBairroFuncionario.setText("Bairro");

        cbBairroFuncionario.setModel(new javax.swing.DefaultComboBoxModel(new String[] {}));
        cbBairroFuncionario.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        cbBairroFuncionario.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbBairroFuncionarioItemStateChanged(evt);
            }
        });

        lblRuaAvenidaFuncionario.setFont(new java.awt.Font("Arial", 1, 11));
        lblRuaAvenidaFuncionario.setText("Rua/Av.");

        cbEnderecoFuncionario.setModel(new javax.swing.DefaultComboBoxModel(new String[] {}));
        cbEnderecoFuncionario.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        cbEnderecoFuncionario.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbEnderecoFuncionarioItemStateChanged(evt);
            }
        });

        lblNumeroFuncionario.setFont(new java.awt.Font("Arial", 1, 11));
        lblNumeroFuncionario.setText("nº.");

        iTxtNumeroFuncionario.setFont(new java.awt.Font("Arial", 0, 12));
        iTxtNumeroFuncionario.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

        lblComplementoFuncionario.setFont(new java.awt.Font("Arial", 1, 11));
        lblComplementoFuncionario.setText("Complemento");

        sTxtCepFuncionario.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        try {
            sTxtCepFuncionario.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##.###-###")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        stxtCompFuncionario.setModel(new javax.swing.DefaultComboBoxModel(new String[] { null, "CASA", "APARTAMENTO"}));
        stxtCompFuncionario.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

        stxtApFuncionario.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

        lblApartamentoCliente.setFont(new java.awt.Font("Arial", 1, 11));
        lblApartamentoCliente.setText("Apartamento");

        jButton1.setText("Editar");
        jButton1.setToolTipText("Editar Endereço");
        jButton1.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)));
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jpnEnderecoFuncionarioLayout = new javax.swing.GroupLayout(jpnEnderecoFuncionario);
        jpnEnderecoFuncionario.setLayout(jpnEnderecoFuncionarioLayout);
        jpnEnderecoFuncionarioLayout.setHorizontalGroup(
            jpnEnderecoFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpnEnderecoFuncionarioLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jpnEnderecoFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jpnEnderecoFuncionarioLayout.createSequentialGroup()
                        .addGroup(jpnEnderecoFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jpnEnderecoFuncionarioLayout.createSequentialGroup()
                                .addComponent(cbEstadoFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(cbCidadeFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jpnEnderecoFuncionarioLayout.createSequentialGroup()
                                .addComponent(lblEstadoFuncionario)
                                .addGap(112, 112, 112)
                                .addComponent(lblCidadeFuncionario)))
                        .addGap(18, 18, 18)
                        .addGroup(jpnEnderecoFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jpnEnderecoFuncionarioLayout.createSequentialGroup()
                                .addComponent(lblBairroFuncionario)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 257, Short.MAX_VALUE))
                            .addComponent(cbBairroFuncionario, 0, 290, Short.MAX_VALUE)))
                    .addGroup(jpnEnderecoFuncionarioLayout.createSequentialGroup()
                        .addGroup(jpnEnderecoFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblRuaAvenidaFuncionario)
                            .addComponent(cbEnderecoFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 271, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(23, 23, 23)
                        .addGroup(jpnEnderecoFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblNumeroFuncionario)
                            .addComponent(iTxtNumeroFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(27, 27, 27)
                        .addGroup(jpnEnderecoFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(stxtCompFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jpnEnderecoFuncionarioLayout.createSequentialGroup()
                                .addComponent(lblComplementoFuncionario)
                                .addGap(75, 75, 75)
                                .addGroup(jpnEnderecoFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(stxtApFuncionario)
                                    .addComponent(lblApartamentoCliente))))))
                .addGap(18, 18, 18)
                .addGroup(jpnEnderecoFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblCefFuncionario)
                    .addComponent(jButton1)
                    .addComponent(sTxtCepFuncionario, javax.swing.GroupLayout.DEFAULT_SIZE, 75, Short.MAX_VALUE))
                .addContainerGap())
        );
        jpnEnderecoFuncionarioLayout.setVerticalGroup(
            jpnEnderecoFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpnEnderecoFuncionarioLayout.createSequentialGroup()
                .addGroup(jpnEnderecoFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jpnEnderecoFuncionarioLayout.createSequentialGroup()
                        .addComponent(lblCefFuncionario)
                        .addGap(7, 7, 7)
                        .addComponent(sTxtCepFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jpnEnderecoFuncionarioLayout.createSequentialGroup()
                        .addGroup(jpnEnderecoFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblEstadoFuncionario)
                            .addComponent(lblCidadeFuncionario))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jpnEnderecoFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cbEstadoFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(cbCidadeFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jpnEnderecoFuncionarioLayout.createSequentialGroup()
                        .addComponent(lblBairroFuncionario)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cbBairroFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jpnEnderecoFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jpnEnderecoFuncionarioLayout.createSequentialGroup()
                        .addGroup(jpnEnderecoFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblRuaAvenidaFuncionario)
                            .addComponent(lblNumeroFuncionario)
                            .addComponent(lblComplementoFuncionario))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jpnEnderecoFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cbEnderecoFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(iTxtNumeroFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(stxtCompFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jpnEnderecoFuncionarioLayout.createSequentialGroup()
                        .addComponent(lblApartamentoCliente)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jpnEnderecoFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(stxtApFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jButton1))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlProfissionalFuncionario.setBackground(new java.awt.Color(255, 255, 255));
        pnlProfissionalFuncionario.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Profissional", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 1, 12))); // NOI18N

        slblDataAdmissaoFuncionario.setFont(new java.awt.Font("Arial", 1, 11));
        slblDataAdmissaoFuncionario.setText("Data Admissão");

        slblDataDemissaoFuncionario.setFont(new java.awt.Font("Arial", 1, 11));
        slblDataDemissaoFuncionario.setText("Data Demissão");

        dTxtSalarioFuncionario.setFont(new java.awt.Font("Arial", 0, 12));
        dTxtSalarioFuncionario.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

        lblSalarioFuncionario.setFont(new java.awt.Font("Arial", 1, 11));
        lblSalarioFuncionario.setText("Salário");

        sTxtCargoFuncionario.setFont(new java.awt.Font("Arial", 0, 12));
        sTxtCargoFuncionario.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

        lblCargoFuncionario.setFont(new java.awt.Font("Arial", 1, 11));
        lblCargoFuncionario.setText("Cargo");

        sTxtDataAdmissao.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        try {
            sTxtDataAdmissao.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        sTxtDataDemissao.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        try {
            sTxtDataDemissao.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        javax.swing.GroupLayout pnlProfissionalFuncionarioLayout = new javax.swing.GroupLayout(pnlProfissionalFuncionario);
        pnlProfissionalFuncionario.setLayout(pnlProfissionalFuncionarioLayout);
        pnlProfissionalFuncionarioLayout.setHorizontalGroup(
            pnlProfissionalFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlProfissionalFuncionarioLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlProfissionalFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(sTxtDataAdmissao)
                    .addComponent(slblDataAdmissaoFuncionario))
                .addGap(18, 18, 18)
                .addGroup(pnlProfissionalFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(sTxtDataDemissao)
                    .addComponent(slblDataDemissaoFuncionario))
                .addGap(18, 18, 18)
                .addGroup(pnlProfissionalFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(sTxtCargoFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblCargoFuncionario))
                .addGap(18, 18, 18)
                .addGroup(pnlProfissionalFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(dTxtSalarioFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblSalarioFuncionario))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlProfissionalFuncionarioLayout.setVerticalGroup(
            pnlProfissionalFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlProfissionalFuncionarioLayout.createSequentialGroup()
                .addGroup(pnlProfissionalFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlProfissionalFuncionarioLayout.createSequentialGroup()
                        .addComponent(lblCargoFuncionario)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(sTxtCargoFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pnlProfissionalFuncionarioLayout.createSequentialGroup()
                        .addGroup(pnlProfissionalFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(slblDataAdmissaoFuncionario)
                            .addComponent(slblDataDemissaoFuncionario)
                            .addComponent(lblSalarioFuncionario))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlProfissionalFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(sTxtDataAdmissao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(pnlProfissionalFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(dTxtSalarioFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(sTxtDataDemissao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlCadastroFuncionario.setBackground(new java.awt.Color(255, 255, 255));
        pnlCadastroFuncionario.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Editar Login", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 1, 12))); // NOI18N

        btCadastroLoginFuncionario.setText("Editar Login");
        btCadastroLoginFuncionario.setToolTipText("Editar Login");
        btCadastroLoginFuncionario.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)));
        btCadastroLoginFuncionario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btCadastroLoginFuncionarioActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlCadastroFuncionarioLayout = new javax.swing.GroupLayout(pnlCadastroFuncionario);
        pnlCadastroFuncionario.setLayout(pnlCadastroFuncionarioLayout);
        pnlCadastroFuncionarioLayout.setHorizontalGroup(
            pnlCadastroFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlCadastroFuncionarioLayout.createSequentialGroup()
                .addGap(41, 41, 41)
                .addComponent(btCadastroLoginFuncionario)
                .addContainerGap(98, Short.MAX_VALUE))
        );
        pnlCadastroFuncionarioLayout.setVerticalGroup(
            pnlCadastroFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlCadastroFuncionarioLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btCadastroLoginFuncionario)
                .addContainerGap(16, Short.MAX_VALUE))
        );

        btSalvarFuncionario.setText("Salvar");
        btSalvarFuncionario.setToolTipText("Salvar");
        btSalvarFuncionario.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)));
        btSalvarFuncionario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btSalvarFuncionarioActionPerformed(evt);
            }
        });

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));
        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Observação", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 1, 12))); // NOI18N

        stxtObsFuncionario.setColumns(20);
        stxtObsFuncionario.setRows(5);
        stxtObsFuncionario.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        jScrollPane2.setViewportView(stxtObsFuncionario);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 697, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 85, Short.MAX_VALUE)
                .addContainerGap())
        );

        jButton2.setText("Sair");
        jButton2.setToolTipText("Sair");
        jButton2.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)));
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jpnCadastroFuncionarioLayout = new javax.swing.GroupLayout(jpnCadastroFuncionario);
        jpnCadastroFuncionario.setLayout(jpnCadastroFuncionarioLayout);
        jpnCadastroFuncionarioLayout.setHorizontalGroup(
            jpnCadastroFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpnCadastroFuncionarioLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jpnCadastroFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jpnCadastroFuncionarioLayout.createSequentialGroup()
                        .addComponent(lblDataFuncionario)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(stxtDataFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jpnCadastroFuncionarioLayout.createSequentialGroup()
                        .addComponent(btSalvarFuncionario)
                        .addGap(18, 18, 18)
                        .addComponent(jButton2))
                    .addComponent(jpnEnderecoFuncionario, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jpnCadastroFuncionarioLayout.createSequentialGroup()
                        .addComponent(pnlProfissionalFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(pnlCadastroFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(lblPessoaFuncionario, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(20, Short.MAX_VALUE))
        );

        jpnCadastroFuncionarioLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btSalvarFuncionario, jButton2});

        jpnCadastroFuncionarioLayout.setVerticalGroup(
            jpnCadastroFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpnCadastroFuncionarioLayout.createSequentialGroup()
                .addGroup(jpnCadastroFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblDataFuncionario)
                    .addComponent(stxtDataFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblPessoaFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jpnEnderecoFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jpnCadastroFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pnlCadastroFuncionario, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlProfissionalFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jpnCadastroFuncionarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton2)
                    .addComponent(btSalvarFuncionario))
                .addContainerGap())
        );

        jpnCadastroFuncionarioLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btSalvarFuncionario, jButton2});

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jpnCadastroFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 771, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(19, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(jpnCadastroFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 586, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(14, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-808)/2, (screenSize.height-627)/2, 808, 627);
    }// </editor-fold>//GEN-END:initComponents

    private void sTxtNomeFuncionarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sTxtNomeFuncionarioActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_sTxtNomeFuncionarioActionPerformed

    private void stxtDataFuncionarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_stxtDataFuncionarioActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_stxtDataFuncionarioActionPerformed

    private void btCadastroLoginFuncionarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btCadastroLoginFuncionarioActionPerformed
        EditarLogin Login = new EditarLogin();
        Login.iniciar(idFun);
        Login.setVisible(true);
    }//GEN-LAST:event_btCadastroLoginFuncionarioActionPerformed

    private void btSalvarFuncionarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btSalvarFuncionarioActionPerformed
        if (validar()) {
            fun = new Funcionario();

            fun.setCargoFuncionario(sTxtCargoFuncionario.getText().trim().toUpperCase());
            fun.setSalarioFuncionario(Double.parseDouble(dTxtSalarioFuncionario.getText().trim()));
            fun.setDataAdmFuncionario(sTxtDataAdmissao.getText().trim());
            fun.setDataDemFuncionario(sTxtDataDemissao.getText().trim());
            fun.setNomePessoa(sTxtNomeFuncionario.getText().trim().toUpperCase());
            fun.setCpfPessoa(sTxtCpfFuncionario.getText().trim().toUpperCase());
            fun.setRgPessoa(sTxtRgFuncionario.getText().trim().toUpperCase());
            fun.setDataNascPessoa(sTxtDataNascimentoFuncionario.getText().trim());
            fun.setTelPessoa(txtTelefoneFuncionario.getText());
            fun.setCelPessoa(sTxtCelularFuncionario.getText().trim());
            fun.setEmailPessoa(sTxtEmailFuncionario.getText().trim().toUpperCase());
            fun.setNumPessoa(Integer.parseInt(iTxtNumeroFuncionario.getText().trim()));
            fun.setComplementoPessoa((String) stxtCompFuncionario.getSelectedItem());
            fun.setApartPessoa(stxtApFuncionario.getText().trim().toUpperCase());
            fun.setObservacao(stxtObsFuncionario.getText().trim().toUpperCase());

            Endereco itemEnd = (Endereco) cbEnderecoFuncionario.getSelectedItem();

            String sql = "UPDATE FUNCIONARIO SET CARGO_FUNCIONARIO=?,SALARIO_FUNCIONARIO=?,DATA_ADM_FUNCIONARIO=TO_DATE('" + fun.getDataAdmFuncionario() + "','DD/MM/YYYY'),DATA_DEM_FUNCIONARIO=TO_DATE('" + fun.getDataDemFuncionario() + "','DD/MM/YYYY'),NOME_FUNCIONARIO=?,CPF_FUNCIONARIO=?,RG_FUNCIONARIO=?,DATA_NASC_FUNCIONARIO=TO_DATE('" + fun.getDataNascPessoa() + "','DD/MM/YYYY'),TEL_FUNCIONARIO=?,CEL_FUNCIONARIO=?,EMAIL_FUNCIONARIO=?,NUM_FUNCIONARIO=?,COMPLEMENTO_FUNCIONARIO=?,APART_FUNCIONARIO=?,ID_ENDERECO=?,OBS_FUNCIONARIO=? WHERE ID_FUNCIONARIO=" + idFun;

            if (sTxtDataDemissao.getText().trim().equals("/  /")) {
                sql = "UPDATE FUNCIONARIO SET CARGO_FUNCIONARIO=?,SALARIO_FUNCIONARIO=?,DATA_ADM_FUNCIONARIO=TO_DATE('" + fun.getDataAdmFuncionario() + "','DD/MM/YYYY'),DATA_DEM_FUNCIONARIO=null,NOME_FUNCIONARIO=?,CPF_FUNCIONARIO=?,RG_FUNCIONARIO=?,DATA_NASC_FUNCIONARIO=TO_DATE('" + fun.getDataNascPessoa() + "','DD/MM/YYYY'),TEL_FUNCIONARIO=?,CEL_FUNCIONARIO=?,EMAIL_FUNCIONARIO=?,NUM_FUNCIONARIO=?,COMPLEMENTO_FUNCIONARIO=?,APART_FUNCIONARIO=?,ID_ENDERECO=?,OBS_FUNCIONARIO=? WHERE ID_FUNCIONARIO=" + idFun;
            }
            Object[] parametros = {fun.getCargoFuncionario(), fun.getSalarioFuncionario(), fun.getNomePessoa(), fun.getCpfPessoa(), fun.getRgPessoa(), fun.getTelPessoa(), fun.getCelPessoa(), fun.getEmailPessoa(), fun.getNumPessoa(), fun.getComplementoPessoa(), fun.getApartPessoa(), itemEnd.getIdEndereco(), fun.getObservacao()};
            Object[] tipos = {String.class, Double.class, String.class, String.class, String.class, String.class, String.class, String.class, Integer.class, String.class, String.class, Integer.class, String.class};


            BD banco = new BD();
            try {
                banco.executar(sql, parametros, tipos);
                JOptionPane.showMessageDialog(rootPane, "Atualização Realizada com Sucesso");
            } catch (Exception ex) {
                Logger.getLogger(EditarFuncionario.class.getName()).log(Level.SEVERE, null, ex);
            }

        }


}//GEN-LAST:event_btSalvarFuncionarioActionPerformed

    private void cbEstadoFuncionarioItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbEstadoFuncionarioItemStateChanged
        try {

            String sql;
            cbCidadeFuncionario.removeAllItems(); // limpa a caixa de cidades atual.

            if (cbEstadoFuncionario.getSelectedItem() != null) {
                Estado itemEst = (Estado) cbEstadoFuncionario.getSelectedItem();
                sql = "Select * from cidade where id_uf = '" + itemEst.getIdUf() + "' order by NOME_CIDADE";


                BD bd = new BD();
                ResultSet r = bd.consultar(sql);

                Cidade cidade1 = new Cidade();
                cbCidadeFuncionario.addItem(cidade1);
                while (r.next()) {
                    Cidade cidade = new Cidade();


                    cidade.setIdCidade(r.getInt("id_cidade"));

                    String nomeCid = r.getString("NOME_CIDADE");
                    cidade.setNomeCidade(nomeCid);


                    cbCidadeFuncionario.addItem(cidade);
                    if (cidade.getNomeCidade().equalsIgnoreCase(cid)) {
                        cbCidadeFuncionario.setSelectedItem(cidade);
                    }
                }
            }
        } catch (ClassNotFoundException ex) {
        } catch (SQLException ex) {
        }

    }//GEN-LAST:event_cbEstadoFuncionarioItemStateChanged

    private void cbCidadeFuncionarioItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbCidadeFuncionarioItemStateChanged
        try {

            String sql;
            cbBairroFuncionario.removeAllItems(); // limpa a caixa de cidades atual.
            if (cbCidadeFuncionario.getSelectedItem() != null) {
                Cidade itemcid = (Cidade) cbCidadeFuncionario.getSelectedItem();

                sql = "Select * from bairro where id_cidade = " + itemcid.getIdCidade() + " order by NOME_BAIRRO";


                BD bd = new BD();
                ResultSet r = bd.consultar(sql);

                Bairro bairro1 = new Bairro();
                cbBairroFuncionario.addItem(bairro1);
                while (r.next()) {

                    Bairro bairro = new Bairro();

                    bairro.setIdBairro(r.getInt("id_bairro"));

                    String nomeBair = r.getString("NOME_BAIRRO");
                    bairro.setNomeBairro(nomeBair);


                    cbBairroFuncionario.addItem(bairro);
                    if (bairro.getNomeBairro().equalsIgnoreCase(bai)) {
                        cbBairroFuncionario.setSelectedItem(bairro);
                    }
                }
            }
        } catch (ClassNotFoundException ex) {
        } catch (SQLException ex) {
        }

    }//GEN-LAST:event_cbCidadeFuncionarioItemStateChanged

    private void cbBairroFuncionarioItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbBairroFuncionarioItemStateChanged
        try {

            String sql;
            cbEnderecoFuncionario.removeAllItems(); // limpa a caixa de cidades atual.
            if (cbBairroFuncionario.getSelectedItem() != null) {
                Bairro itemBai = (Bairro) cbBairroFuncionario.getSelectedItem();

                sql = "Select * from endereco where id_bairro = " + itemBai.getIdBairro() + "order by NOME_ENDERECO";


                BD bd = new BD();
                ResultSet r = bd.consultar(sql);

                Endereco end1 = new Endereco();
                cbEnderecoFuncionario.addItem(end1);

                while (r.next()) {


                    Endereco ende = new Endereco();

                    ende.setIdEndereco(r.getInt("id_endereco"));

                    ende.setNomeEndereco(r.getString("NOME_ENDERECO"));

                    ende.setCepEndereco(r.getString("cep"));

                    cbEnderecoFuncionario.addItem(ende);
                    if (ende.getNomeEndereco().equalsIgnoreCase(end)) {
                        cbEnderecoFuncionario.setSelectedItem(ende);
                    }
                }
            }
        } catch (ClassNotFoundException ex) {
        } catch (SQLException ex) {
        }
    }//GEN-LAST:event_cbBairroFuncionarioItemStateChanged

    private void cbEnderecoFuncionarioItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbEnderecoFuncionarioItemStateChanged
        if (cbEnderecoFuncionario.getSelectedItem() != null) {
            Endereco itemEnd = (Endereco) cbEnderecoFuncionario.getSelectedItem();

            sTxtCepFuncionario.setText(itemEnd.getCepEndereco());
            sTxtCepFuncionario.setEnabled(false);
        }
    }//GEN-LAST:event_cbEnderecoFuncionarioItemStateChanged

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed

        cbEstadoFuncionario.setEnabled(true);
        cbCidadeFuncionario.setEnabled(true);
        cbBairroFuncionario.setEnabled(true);
        cbEnderecoFuncionario.setEnabled(true);
        iTxtNumeroFuncionario.setEnabled(true);
        stxtCompFuncionario.setEnabled(true);
        stxtApFuncionario.setEnabled(true);
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        this.dispose();
    }//GEN-LAST:event_jButton2ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new EditarFuncionario().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btCadastroLoginFuncionario;
    private javax.swing.JButton btSalvarFuncionario;
    private javax.swing.JComboBox cbBairroFuncionario;
    private javax.swing.JComboBox cbCidadeFuncionario;
    private javax.swing.JComboBox cbEnderecoFuncionario;
    private javax.swing.JComboBox cbEstadoFuncionario;
    private javax.swing.JTextField dTxtSalarioFuncionario;
    private javax.swing.JTextField iTxtNumeroFuncionario;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JPanel jpnCadastroFuncionario;
    private javax.swing.JPanel jpnEnderecoFuncionario;
    private javax.swing.JLabel lblApartamentoCliente;
    private javax.swing.JLabel lblBairroFuncionario;
    private javax.swing.JLabel lblCargoFuncionario;
    private javax.swing.JLabel lblCefFuncionario;
    private javax.swing.JLabel lblCelularFuncionario;
    private javax.swing.JLabel lblCidadeFuncionario;
    private javax.swing.JLabel lblComplementoFuncionario;
    private javax.swing.JLabel lblCpfFuncionario;
    private javax.swing.JLabel lblDataFuncionario;
    private javax.swing.JLabel lblDataNascimentoFuncionario;
    private javax.swing.JLabel lblEmailFuncionario;
    private javax.swing.JLabel lblEstadoFuncionario;
    private javax.swing.JLabel lblNomeFuncionario;
    private javax.swing.JLabel lblNumeroFuncionario;
    private javax.swing.JPanel lblPessoaFuncionario;
    private javax.swing.JLabel lblRgFuncionario;
    private javax.swing.JLabel lblRuaAvenidaFuncionario;
    private javax.swing.JLabel lblSalarioFuncionario;
    private javax.swing.JLabel lblTelefoneFuncionario;
    private javax.swing.JPanel pnlCadastroFuncionario;
    private javax.swing.JPanel pnlProfissionalFuncionario;
    private javax.swing.JTextField sTxtCargoFuncionario;
    private javax.swing.JFormattedTextField sTxtCelularFuncionario;
    private javax.swing.JFormattedTextField sTxtCepFuncionario;
    private javax.swing.JFormattedTextField sTxtCpfFuncionario;
    private javax.swing.JFormattedTextField sTxtDataAdmissao;
    private javax.swing.JFormattedTextField sTxtDataDemissao;
    private javax.swing.JFormattedTextField sTxtDataNascimentoFuncionario;
    private javax.swing.JTextField sTxtEmailFuncionario;
    private javax.swing.JTextField sTxtNomeFuncionario;
    private javax.swing.JTextField sTxtRgFuncionario;
    private javax.swing.JLabel slblDataAdmissaoFuncionario;
    private javax.swing.JLabel slblDataDemissaoFuncionario;
    private javax.swing.JTextField stxtApFuncionario;
    private javax.swing.JComboBox stxtCompFuncionario;
    private javax.swing.JTextField stxtDataFuncionario;
    private javax.swing.JTextArea stxtObsFuncionario;
    private javax.swing.JFormattedTextField txtTelefoneFuncionario;
    // End of variables declaration//GEN-END:variables

    public void iniciar(int idf) {


        idFun = idf;
//////////////////////////////PREENCHENDO OS CAMPOS DA TELA EDITAR FUNCIONARIO/////////////////////////////////
        try {

            String sql = "SELECT * FROM FUNCIONARIO WHERE ID_FUNCIONARIO=" + idFun;
            BD bd = new BD();
            ResultSet r1 = bd.consultar(sql);

            if (r1.next()) {
                sTxtNomeFuncionario.setText(r1.getString("NOME_FUNCIONARIO"));
                sTxtCpfFuncionario.setText(r1.getString("CPF_FUNCIONARIO"));
                sTxtRgFuncionario.setText(r1.getString("RG_FUNCIONARIO"));
                sTxtDataNascimentoFuncionario.setText(r1.getString("DATA_NASC_FUNCIONARIO"));


                String data23 = r1.getString("DATA_NASC_FUNCIONARIO");
                String dtFinalCc = "";
                if (data23 != null) {
                    String dataCc = data23.split(" ")[0];  //corta a strin onde tem o espaço
                    String[] vDataCc = dataCc.split("-");//corta a onde tem "-"
                    String diaCc = vDataCc[2];
                    String mesCc = vDataCc[1];
                    String anoCc = vDataCc[0];
                    dtFinalCc = diaCc + "/" + mesCc + "/" + anoCc;
                    sTxtDataNascimentoFuncionario.setText(dtFinalCc);
                }


                txtTelefoneFuncionario.setText(r1.getString("TEL_FUNCIONARIO"));
                sTxtCelularFuncionario.setText(r1.getString("CEL_FUNCIONARIO"));
                sTxtEmailFuncionario.setText(r1.getString("EMAIL_FUNCIONARIO"));
                iTxtNumeroFuncionario.setText(r1.getString("NUM_FUNCIONARIO"));
                stxtCompFuncionario.setSelectedItem(r1.getString("COMPLEMENTO_FUNCIONARIO"));
                stxtApFuncionario.setText(r1.getString("APART_FUNCIONARIO"));

                sTxtCargoFuncionario.setText(r1.getString("CARGO_FUNCIONARIO"));
                dTxtSalarioFuncionario.setText(r1.getString("SALARIO_FUNCIONARIO"));
                stxtObsFuncionario.setText(r1.getString("OBS_FUNCIONARIO"));

                //---------------------------------formatando a data de admissao---------------------------

                String data2 = r1.getString("DATA_ADM_FUNCIONARIO");
                String dtFinalC = "";
                if (data2 != null) {
                    String dataC = data2.split(" ")[0];  //corta a strin onde tem o espaço
                    String[] vDataC = dataC.split("-");//corta a onde tem "-"
                    String diaC = vDataC[2];
                    String mesC = vDataC[1];
                    String anoC = vDataC[0];
                    dtFinalC = diaC + "/" + mesC + "/" + anoC;
                }

//---------------------------------fim da formatação da data--------------------------------
//---------------------------------formatando a data de demissão---------------------------
                String data1 = r1.getString("DATA_DEM_FUNCIONARIO");
                String dtFinal = "";
                if (data1 != null) {
                    String data = data1.split(" ")[0];  //corta a strin onde tem o espaço
                    String[] vData = data.split("-");//corta a onde tem "-"
                    String dia = vData[2];
                    String mes = vData[1];
                    String ano = vData[0];
                    dtFinal = dia + "/" + mes + "/" + ano;
                }

//---------------------------------fim da formatação da data--------------------------------

                sTxtDataAdmissao.setText(dtFinalC);
                sTxtDataDemissao.setText(dtFinal);
            }

        } catch (ClassNotFoundException ex) {
        } catch (SQLException ex) {
        }

        try {
            String sqlt = "SELECT E.ID_UF,CC.NOME_CIDADE,B.NOME_BAIRRO,EN.NOME_ENDERECO FROM FUNCIONARIO CL "
                    + "INNER JOIN ENDERECO EN ON CL.ID_ENDERECO=EN.ID_ENDERECO "
                    + "INNER JOIN BAIRRO B ON B.ID_BAIRRO = EN.ID_BAIRRO "
                    + "INNER JOIN CIDADE CC ON CC.ID_CIDADE=B.ID_CIDADE "
                    + "INNER JOIN ESTADO E ON E.ID_UF=CC.ID_UF "
                    + "WHERE CL.ID_FUNCIONARIO=" + idFun;

            BD bd2 = new BD();
            ResultSet r12;

            r12 = bd2.consultar(sqlt);

            if (r12.next()) {
                estad = r12.getString("ID_UF");
                cid = r12.getString("NOME_CIDADE");
                bai = r12.getString("NOME_BAIRRO");
                end = r12.getString("NOME_ENDERECO");
            }

        } catch (ClassNotFoundException ex) {
            Logger.getLogger(EditarCliente.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException ex) {
            Logger.getLogger(EditarCliente.class.getName()).log(Level.SEVERE, null, ex);
        }

        try {
            String sql = "Select * from estado order by id_uf";
            BD bd = new BD();
            ResultSet r1 = bd.consultar(sql);
            Estado est = new Estado();
            cbEstadoFuncionario.addItem(est);

            while (r1.next()) {
                Estado estado = new Estado();
                String sigla = r1.getString("id_uf");
                // preenchendo informacoes do objeto
                estado.setIdUf(sigla);
                // e.setId(r1.getInt("id");
                cbEstadoFuncionario.addItem(estado);
                if (estado.getIdUf().equalsIgnoreCase(estad)) {
                    cbEstadoFuncionario.setSelectedItem(estado);
                }
            }



        } catch (ClassNotFoundException ex) {
        } catch (SQLException ex) {
        }




        cbEstadoFuncionario.setEnabled(false);
        cbCidadeFuncionario.setEnabled(false);
        cbBairroFuncionario.setEnabled(false);
        cbEnderecoFuncionario.setEnabled(false);
        iTxtNumeroFuncionario.setEnabled(false);
        stxtCompFuncionario.setEnabled(false);
        stxtApFuncionario.setEnabled(false);

    }

    public boolean validar() {
        boolean Resultado = true;
        //////////////////////////////////////////////////////////////////  

        if (validarNome(sTxtNomeFuncionario.getText()) == false) {
            Resultado = false;
        } else if (validarCpf(sTxtCpfFuncionario.getText()) == false) {
            Resultado = false;
        } else if (validarRG(sTxtRgFuncionario.getText()) == false) {
            Resultado = false;
        } else if (validarData(sTxtDataNascimentoFuncionario.getText()) == false) {
            Resultado = false;
        } else if (validarTelefone(txtTelefoneFuncionario.getText()) == false) {
            Resultado = false;
        } else if (validarTelefone(sTxtCelularFuncionario.getText()) == false) {
            Resultado = false;
        } else if (validarEmail(sTxtEmailFuncionario.getText()) == false) {
            Resultado = false;
        } else if (sTxtCepFuncionario.getText().trim().equals(".   -")) {
            Resultado = false;
            JOptionPane.showMessageDialog(frameI, "O preenchimento do campo Endereço é obrigatório!");
        } else if (validarNumero(iTxtNumeroFuncionario.getText()) == false) {
            Resultado = false;
        } else if (stxtCompFuncionario.getSelectedItem() == null) {
            Resultado = false;
            JOptionPane.showMessageDialog(frameI, "O preenchimento do campo Complemento é obrigatório");
        } else if (validarSalaApart(stxtApFuncionario.getText()) == false) {
            Resultado = false;
        } else if (validarData(sTxtDataAdmissao.getText()) == false) {
            Resultado = false;
        } else if (validarDataDemissao(sTxtDataDemissao.getText()) == false) {
            Resultado = false;
        } else if (validarCargo(sTxtCargoFuncionario.getText()) == false) {
            Resultado = false;
        } else if (validarValor(dTxtSalarioFuncionario.getText()) == false) {
            Resultado = false;
        } else if (validarObservacao(stxtObsFuncionario.getText()) == false) {
            Resultado = false;
        }




        return Resultado;
    }
}
